const { series,
    parallel, } = require('gulp');
const { cleanAll, cleanDist,htmlBeautyHandler, copyJsHandler, fontsHandler, libsHandler, copyFavHandler, scssHandler, watchHandler, htmlHandler, copyImgHandler, servicetHandler, babelHandler, jsHandler, cssHandler, imgHandler ,spriteHandler}
    = require('./task/index')

//调试命令
exports.debug = series(cleanDist, parallel(series(parallel(copyJsHandler, fontsHandler, libsHandler, copyFavHandler, scssHandler,watchHandler)), copyImgHandler,servicetHandler,htmlHandler,spriteHandler));
//打包命令
//jsHandler js代码压缩混淆.慎用
//babelHandler es6编译
exports.build = series(cleanAll, parallel(series(parallel(copyJsHandler, fontsHandler, htmlHandler, libsHandler, copyImgHandler, copyFavHandler, scssHandler), cssHandler, imgHandler,spriteHandler)));

//单独对图片打包
exports.imgmin = series(imgHandler)

//雪碧图生成
exports.sprite = series(spriteHandler)